package common.components.transition.transitions
{
	import common.components.transition.events.TransitionEvent;
	
	import mx.controls.Image;
	import mx.events.EffectEvent;
	import mx.effects.Fade;
	
	public class NoneFx extends Transition
	{
		public function NoneFx(runner:TransitionRunner, img:Image, transTime:Number, stayTime:Number)
		{
			super(runner, img, transTime, stayTime);
			this.noneInStart();
		}
		
		private function noneInStart():void
		{
			var fade:mx.effects.Fade = new mx.effects.Fade(this.image);
			fade.alphaFrom = 1;
			fade.alphaTo = 1;
			fade.duration = 100;
			fade.addEventListener(EffectEvent.EFFECT_END, onFadeInEnd);
			fade.play();
		}
		
		private function onFadeInEnd(evt:EffectEvent):void
		{
			this.dispatchEvent(new TransitionEvent(TransitionEvent.TRANS_IN_END));
		}		
		
	}
}